package seap.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import seap.bo.LancarLenhaBO;

public class LancarLenhaAction extends DispatchAction {
	
	LancarLenhaBO bo = new LancarLenhaBO();
	
    private Log logger = LogFactory.getLog(this.getClass());
    
	public ActionForward cadastrar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    	logger.debug("Lancar Lenha");
    	
    	String param1 = (String) request.getParameter("quantidade");
    	String result = bo.add(param1);
        
        return mapping.findForward(result);
    }
	
	public ActionForward remover(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    	logger.debug("");
        
        return null;
    }
	
	public ActionForward buscar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    	logger.debug("");
        
        return null;
    }
}
